package com.dnjn.happiness.biz.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum AppraiseGradeEnum {
    S("S", 10),

    A("A", 8),

    B("B", 6),

    C("C", 4),

    D("D", 2);






    private String type;

    private Integer score;


    public static Integer getScore(String type) {
        AppraiseGradeEnum[] values = AppraiseGradeEnum.values();
        for (AppraiseGradeEnum item : values) {
            if (type.equals(item.type)) {
                return item.score;
            }
        }
        return null;

    }

}


